package com.xyazm.common.api;


import lombok.Data;

import java.util.List;

/**
 * 分页数据封装类
 * Created by macro on 2019/4/19.
 */
@Data
public class CommonPage<T> {

    private Long total;
    private List<T> list;

    public CommonPage(long total, List<T> list) {
        this.total = total;
        this.list = list;
    }

    public static <T> CommonPage<T> convertPage(Long total, List<T> list) {
        CommonPage<T> result = new CommonPage<T>(total,list);
        return result;
    }

}
